<template>
  <div class="detail-page">
    <div class="swipe">
      <!-- 搜索 -->

      <div class="search">
        <button type="primary" @click="fn" size="small" class="ButtonJump">
          上海
        </button>
        <div class="searchBox">
          <van-search
            v-model="value"
            show-action
            placeholder="请输入小区或地址"
            background="rgba(0,0,0,0)"
          >
            <template #action>
              <van-icon name="location-o" color="#ffffff" size="25" />
            </template>
          </van-search>
        </div>
      </div>
      <!-- 轮播 -->
      <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
        <van-swipe-item><img src="@/assets/1.png" alt="" /></van-swipe-item>
        <van-swipe-item><img src="@/assets/2.png" alt="" /></van-swipe-item>
        <van-swipe-item><img src="@/assets/3.png" alt="" /></van-swipe-item>
      </van-swipe>
    </div>
    <!-- 宫格 -->
    <div class="label">
      <van-grid :border="false" square icon-size="35">
        <van-grid-item icon="wap-home-o" text="整租" />
        <van-grid-item icon="friends-o" text="合租" />
        <van-grid-item icon="location-o" text="地图找房" />
        <van-grid-item icon="home-o" text="去出租" />
      </van-grid>
    </div>
    <div class="facilities">
      <div class="house">
        <h4>租房小组</h4>
        <span class="more">更多</span>
      </div>
      <div class="details">
        <div class="top-row">
          <div class="box">
            <div class="tiveing">
              <img src="" alt="图片" />
            </div>
            <div class="characters">
              <span>家住回龙观</span>
              <span>归属的感觉</span>
            </div>
          </div>
          <div class="box">
            <div class="tiveing">
              <img src="" alt="图片" />
            </div>
            <div class="characters">
              <span>喧嚣三里屯</span>
              <span>繁华的背后</span>
            </div>
          </div>
        </div>
        <div class="bottom-row">
          <div class="box">
            <div class="tiveing">
              <img src="" alt="图片" />
            </div>
            <div class="characters">
              <span>宜居四五环</span>
              <span>大都市生活</span>
            </div>
          </div>
          <div class="box">
            <div class="tiveing">
              <img src="" alt="图片" />
            </div>
            <div class="characters">
              <span>比邻十号线</span>
              <span>地铁心连心</span>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'article-page',
  data () {
    return {
      value: '',
      active: 0
    }
  },
  methods: {
    fn () {
      this.$router.push('/listsofcities')
    }
  },
  async created () {}
}
</script>
<style lang="less" scoped>
.swipe {
  margin: 0 auto;
  display: flex;
  position: relative;
  .my-swipe .van-swipe-item {
    color: #fff;
    height: 212px;
    font-size: 20px;
    line-height: 150px;
    text-align: center;
    background-color: #39a9ed;
  }

  img {
    width: 100%;
  }
}
.search {
  position: absolute;
  left: 38px;
  top: 16px;
  z-index: 9;
}
.label {
  width: 375px;
  height: 100px;
}
.facilities {
  width: 100%;
  height: 188px;
  background-color: #f6f5f6;
  .house {
    display: flex;
    .more {
      width: 30px;
      height: 30px;
      font-size: 13px;
      margin-left: 264px;
      margin-top: 19px;
      // background-color: #adfef2;
    }
  }
  .details {
    display: flex;
    justify-content: space-between;
    width: 355px;
    height: 130px;
    margin-left: 10px;
    margin-top: -14px;
    // background-color: #aaddfa;
  }
  .top-row,
  .bottom-row {
    justify-content: center;
    align-items: center;
  }
  .box {
    display: flex;
    width: 167px;
    height: 58px;
    margin: 5px;
    border-radius: 5%;
    background-color: #fff;
    .tiveing {
      width: 150px;
      height: 55px;
      // background-color: #a86262;
    }
    .characters {
      margin-top: 3px;
      font-size: 13px;
    }
  }
}
.ButtonJump {
  width: 41px;
  height: 36px;
  margin-left: -9px;
  margin-top: 2px;
  font-size: 12px;
}
.searchBox {
  margin-left: 20px;
  margin-top: -45px;
}
</style>
